from django.db import models

from member.models import Member


# Create your models here.
class Deposit(models.Model):
    member = models.ForeignKey(Member)
    deposited_amount = models.IntegerField(max_length=20)
    loan_clearance = models.BooleanField(max_length=10)
#     receiver = models.ForeignKey(Member, related_name='member_temps')
    date_of_deposit = models.DateField()

    class Meta:
        db_table = 'deposits'
        ordering = ['date_of_deposit']

    def depositor(self):
        return u'%s %s' %(self.member.first_name, self.member.last_name)

    def __unicode__(self):
        return self.deposit_amount
    